
<div class="table-frame">
    <ul class="tabs">
        <li><a href="" class="selected">数据</a></li>
        <li><a href="">图表</a></li>
    </ul>
    <div class="tab-contents">
        <div>
            <div class="table-actions">
                <!--
                <button type="submit">日</button>
                <button type="submit">周</button>
                <button type="submit">月</button>
                -->
                &nbsp;
                &nbsp;
                &nbsp;
                &nbsp;
                <form id="theForm" action="?a=export" style="display:inline;" method="POST">
                    <button type="button" onclick="exportTable()">导出为Excel</button>
                </form>
            </div>
            <table class="ecga-table  locktable" border="0" cellspacing="0" cellpadding="0">
                <tr class="th-desc">
                <?php foreach ($table->headerGroups as $group => $headers):?>
                    <th colspan="<?php $this->put(count($headers))?>"><?php $this->put($group, false);?></th>
                <?php endforeach;?>
                </tr>
                <tr class='th lock-th'>
                    <?php foreach ($table->headers as $id => $caption):?>
                    <th lock="<?php $this->put(isset($caption['lock']) ? $caption['lock'] : ''); ?>"><?php $this->put($caption['fillName'], false);?></th>
                    <?php endforeach;?>
                </tr>
            <?php foreach ($table->rows as $rowId => $row):?>
                <tr class="<?php $this->alternate();?> data-row">
                    <?php foreach ($table->headers as $id => $caption):?>
                    <td><?php $this->put($row[$id], false);?></td>
                    <?php endforeach;?>
                </tr>
            <?php endforeach; ?>
            </table>
        </div>
        <div id="chartShow" class="chartShow" style="display: none">
            <?php foreach ($table->chartData as $type => $charts) :?>
                <p class="dime">
                    自定义维度 : <select name="<?php $this->put($type, false)?>">
                        <?php foreach ($charts as $key => $value) : ?>
                        <option value="<?php $this->put($key, false)?>"><?php $this->put($value['name'], false);?></option>
                        <?php endforeach;?>
                    </select>
                </p>
                <div id="show_<?php $this->put($type, false)?>"></div>
            <?php endforeach;?>
        </div>
    </div>
    <script>
    /**
	 * 对需要锁行、列的表格进行处理
	 */
	var lockTable = new LockTable($$('.locktable'));
	lockTable.render();
    </script>
</div>
